/**
 *   This file is part of WiFiStorer.

    WiFiStorer is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    WiFiStorer is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with WiFiStorer.  If not, see <http://www.gnu.org/licenses/>.
    
    @author Ontic Soluciones
    @license GNU GPLv3
    @copyright 2010 Ontic Soluciones
    @link http://www.ontic.es
    @contact android@ontic.es
 */



package com.Storer;

import com.Storer.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.provider.Settings;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

/**
 * Gestión del GPS
 * @see PreguntaWifi
 * @author Ontic Soluciones
 *
 */
public class PreguntaGPS extends Activity
{
	private Button buttonSi;
	private Button buttonNo;
	private TextView text;
	
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.pregunta);
		
		buttonSi = (Button) this.findViewById(R.id.buttonSi);
		buttonNo = (Button) this.findViewById(R.id.buttonNo);
		
		text = (TextView) this.findViewById(R.id.textView);
		
		text.append("El sistema GPS está desactivado, ¿activar?");
		
		buttonSi.setOnClickListener(new View.OnClickListener() 
		{
			public void onClick(View v) 
			{
				startActivity(new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS));
				finish();		
			}
		});
	
		buttonNo.setOnClickListener(new View.OnClickListener() 
		{			
			public void onClick(View v) 
			{
				finish();
			}
		});
	}
	public void onPause() {
	  super.onPause();
	}

}
